package com.cgy.wodeyigui.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.cgy.common.valid.AddGroup;
import com.cgy.common.valid.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.*;

/**
 * 品牌
 * 
 * @author Chen
 * @email 481691470@qq.com
 * @date 2022-01-12 10:51:50
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;


	/**
	 * 品牌id
	 */
	@Null(message = "新增不能指定id",groups = {AddGroup.class})//group
	@NotNull(message = "修改必须指定id",groups = {UpdateGroup.class})
	@TableId
	private Long brandId;
	/**
	 * 品牌名
	 */
	@NotBlank(message = "品牌名不能为空",groups ={AddGroup.class} )//不能为空@NotEntiey也是不能为空
	private String name;
	/**
	 * 品牌logo地址
	 */

	@NotBlank(groups = {AddGroup.class})
	@URL(message = "log必须是合法的地址",groups = {AddGroup.class,UpdateGroup.class})
	private String logo;
	/**
	 * 介绍
	 */
	private String descript;
	/**
	 * 显示状态[0-不显示；1-显示]
	 */

	@Min(value = 0,message = "排序必须大于0")
	private Integer showStatus;
	/**
	 * 检索首字母
	 */
//	@NotEmpty(groups = {AddGroup.class})
//	@Pattern(regexp="/^[a-zA-Z]$/",message = "检索字母必须是一个字母",groups = {AddGroup.class,UpdateGroup.class})
	private String firstLetter;
	/**
	 * 排序
	 */
//	@Null(groups = {AddGroup.class})
//	@Min(value = 0,message = "排序必须大于等于0")
	private Integer sort;

}
